﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AppDataStruct;

namespace EECMISWS
{
    public class QueryPaperInfo
    {
        public PaperInfo HZ
        {
            get;
            set;
        }

        public PaperInfo SCZ
        {
            get;
            set;
        }

        public PaperInfo DLZ
        {
            get;
            set;
        }


        /// <summary>
        /// 查询是否成功
        /// </summary> 
        public bool Success { get; set; }

        /// <summary>
        /// 错误代码
        /// </summary>
        public string ErrorCode { get; set; }

        /// <summary>
        /// 如果查询包含多个来源，每个接口返回的错误消息以$分隔
        /// </summary>
        public string ErrorMessage { get; set; }

        public void SetErrorCode(object code)
        {
            ErrorCode = code.ToString();
        }

        public void SetError(string error)
        {
            if (string.IsNullOrEmpty(ErrorMessage))
            {
                ErrorMessage = error;
            }
            else
            {
                ErrorMessage += "$";
                ErrorMessage += error;
            }
        }
    }
}
